<?php


namespace app\validate;

use think\Validate;

class StationCheck extends Validate
{
    protected $rule = [
        'id'=>'require',
        'user_id'=>'require',
        'pic' => 'require',
        'name' => 'require',
        'address'=>'require',
        'province_id'=>'require',
        'city_id'=>'require',
        'area_id' => 'require',
        'province' => 'require',
        'city' => 'require',
        'area' => 'require',
        'lat' => 'require',
        'lng' => 'require',
        'images' => 'require',
        'phone' => 'require',
        'license_image' => 'require',

    ];

    protected $message = [
        'id.require' => '电站id不能为空',
        'user_id.require' => '用户id不能为空',
        'pic.require' => '请上传电站头像',
        'name.require' => '请输入电站名称',
        'address.require' => '请输入详细位置',
        //'province_id.require' => '请选择省市区地址',
        //'city_id.require' => '请选择省市区地址',
        //'area_id.require'=>'请选择省市区地址',
        'province.require' => '请选择省市区地址',
        'city.require' => '请选择省市区地址',
        'area.require'=>'请选择省市区地址',
        'lat.require'=>'纬度不能为空',
        'lng.require'=>'经度不能为空',
        'images' => '请上传详情图片',
        'phone' => '请输入电站服务电话',
        'license_image' => '请上传营业执照照片',
    ];

    protected $scene = [
        'station_del' => ['id','user_id'],
        'station_check' => ['user_id','pic','name','address','province','city','area','lat','lng','images','phone','license_image'],
        'station_save' => ['id','user_id','pic','name','address','province','city','area','lat','lng','images','phone','license_image'],
    ];
}